// Copyright (C) joyinter
// All rights reserved.
// 
// Author : Jiang Li
// Date   : 2005-1-7

#ifndef __CMD_DBLOGTIMELIMIT_H_SERVER_SVR_MAIN__
#define __CMD_DBLOGTIMELIMIT_H_SERVER_SVR_MAIN__

#pragma once

#include "cmd_dblog.h"
#include "cmd_handler.h"

namespace JoyServer
{

// class CJoyAsyncCmdKickUser

class CJoyAsyncCmdDbLogTimeLimit : public CJoyAsyncCmdDbLog
{
public:
    CTime   m_stopTime;
    CString m_nickname;
    CString m_username;
    CString m_why;
    bool    m_stop;
public:

    CJoyAsyncCmdDbLogTimeLimit(CJoyCmdHandler::CCommandContext& context)
        : CJoyAsyncCmdDbLog(context)
    {
        m_stop = false;
    }

    bool LoadUserInfo();

    virtual void FormatAdminNote(CString& note);
    virtual PCSTR GetCommandName();
    virtual void ShowLimits(CJoyCmdHandler*, CJoyCmdHandler::CCommandContext& context);

    bool ExtractParams(CJoyCmdHandler* pHandler, CJoyCmdHandler::CCommandContext& context, CJoyMainUser*& pUser);
};


} // namespace JoyServer

#endif  // __CMD_DBLOGTIMELIMIT_H_SERVER_SVR_MAIN__